/**
 * 
 */
package bingo.validation;

/**
 * 表示一个执行校验过程中出现的运行时异常
 * 
 * <p>
 * 注意：这是一个表示程序执行错误的异常类
 */
public class ValidationException extends RuntimeException {

	private static final long serialVersionUID = -3000941603832404333L;
	
	/** 表示导致此异常出现的validator类 */
	private IValidator validator;
	
	/** 表示校验结果 */
	private ValidationResults result;

	public ValidationException() {
		super();
	}
	
	public ValidationException(String msg,IValidator validator) {
		super(msg);
		this.validator = validator;
	}
	
	public ValidationException(String msg,Throwable e,IValidator validator) {
		super(msg,e);
		this.validator = validator;
	}	

	public ValidationException(String msg, Throwable e) {
		super(msg, e);
	}

	public ValidationException(String msg) {
		super(msg);
	}

	public ValidationException(Throwable e) {
		super(e);
	}

	public IValidator getValidator() {
		return validator;
	}

	public void setValidator(IValidator validator) {
		this.validator = validator;
	}

	public ValidationResults getResult() {
		return result;
	}

	public void setResult(ValidationResults result) {
		this.result = result;
	}
}
